<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>订单详情</title>
<link rel="shortcut icon" href="/images/user/favicon.png" type="image/x-icon"/>
<link href="/css/user/buy/css.css" rel="stylesheet" type="text/css" />
<link href="/css/dialog.css" rel="stylesheet" type="text/css" /> 
<link href="/css/user/users/member_center.css" rel="stylesheet" type="text/css" /> 
<script type="text/javascript" src="/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="/js/dialog.min.js"></script>
<script type="text/javascript" src="/js/bstdialog.min.js"></script>
<script type="text/javascript" src="/js/user/ntabs.js"></script>
<script type="text/javascript" src="/js/member-center.js"></script>
<script type="text/javascript" src="/js/user/users/member_center/menu_line.js"></script>
<script type="text/javascript" src="/js/user/users/consume_record/order_manage/order_detail.js"></script>
</head>
<body>
<div class="Wrapper">
	<!--会员中心头部-->
	<jsp:include page="../../../common/member/memberHeader.jsp"></jsp:include>
    <!--会员中心中间部分-->
    <div class="uc_bd mt20 mb20 ">
    	<div class="uc_layer">
            <div class="account">
                <!--会员信息左侧-->
                <jsp:include page="../../../common/consume/consume_left.jsp"></jsp:include>
            	<!--会员信息左侧-->
                <!--基本资料右侧-->
                <div class="member_r fr">
                	<!--订单详情开始-->
                	<div class="uitopb uitopb_border mb20">
                    	<div class="lm-t tabs bread"><a href="/consume/order/manage">消费记录</a> > <a href="/consume/order/manage">订单管理</a> > 订单详情</div>
                    </div>
                    <div class="order_detail">
                    	<div class="return_list"><a href="/consume/order/manage">返回订单列表</a></div>
                        <h2><span>订单号：</span><font color="#00a2c9">${orderVo.orderNum}</font></h2>
                        <ul class="cle">
                        	<li>
                            	<dl class="cle">
                                	<dt>状态：</dt>
                                    <dd>
                                    	<c:choose>
				                        	<c:when test="${orderVo.orderState == 1}">
				                        		<c:choose>
				                        			<c:when test="${orderVo.isDredge == 0}">未开通</c:when>
				                        			<c:otherwise>已开通</c:otherwise>
				                        		</c:choose>
				                        	</c:when>
				                        	<c:when test="${orderVo.orderState == 0}">待付款</c:when>
				                        	<c:when test="${orderVo.orderState == 2}">已作废</c:when>
			                        	</c:choose>
                                    <dd>
                                </dl>
                            </li>
                            <li>
                                <dl class="cle">
                                	<dt>购买时间：</dt>
                                    <dd><fmt:formatDate value="${orderVo.occurTime}" pattern="yyyy-MM-dd HH:mm:ss"/><dd>
                                </dl>
                            </li>
                            <li>
                                <dl class="cle">
                                	<dt>支付方式：</dt>
                                    <dd>${orderVo.payWayName}<dd>
                                </dl>
                            </li>
                            <li>
                                <dl class="cle">
                                	<dt>类型：</dt>
                                    <dd>
                                    	<c:choose>
				                        	<c:when test="${orderVo.isFree == 0}">
				                        		<c:choose>
				                        			<c:when test="${orderVo.buyType == 0}">购买</c:when>
				                        			<c:when test="${orderVo.buyType == 1}">续费</c:when>
				                        			<c:otherwise>升级</c:otherwise>
				                        		</c:choose>
				                        	</c:when>
				                        	<c:when test="${orderVo.isFree == 1}">试用</c:when>
			                        	</c:choose>
                                    <dd>
                                </dl>
                            </li>
                        </ul>
                        <div class="cl"></div>
                    </div>
                    <div class="order_supplier orderCotent mt20">
                    	<div class="lm-t">供应商信息</div>
                        <div class="box">
                        	<ul class="cle">
                            	<li>供应商：浙江百顺通信息科技有限公司</li>
                                <li>供应商联系方式：0571-81023701</li>
                            </ul>
                            <div class="cl"></div>
                        </div>
                    </div>
                    <div class="order_user orderCotent mt20">
                    	<div class="lm-t">使用方信息</div>
                        <div class="box">
                        	<ul class="cle">
                            	<li>使用单位：${orderVo.belongCompanyName}</li>
                                <li>公司域名：${orderVo.companyDomainName}</li>
                                <li>管理员帐号：${orderVo.userEmail}</li>
                                <%-- <c:if test="${orderVo.newProId == null && orderVo.orderState == 0}"> --%>
                                <c:if test="${orderVo.orderState == 1}">
	                                <li>&nbsp;</li>
	                                <li>&nbsp;</li>
	                                <li style="padding-top:10px;"><a href="javascript:void(0)" data-order="${orderVo.orderId}" class="bst-btn">再次获取管理员密码</a></li>
                                </c:if>
                            </ul>
                            <div class="cl"></div>
                        </div>
                    </div>
                  	<div class="order_listing orderCotent mt20">
                   	  <div class="lm-t">商品清单</div>
                        <div class="box">
                       	  <table width="100%" border="0" cellspacing="1" cellpadding="0" bgcolor="#dbdbdb">
                        	  <tr>
                        	    <td width="30%" align="center" bgcolor="#FFFFFF"><b>商品名称</b></td>
                        	    <td width="6%" align="center" bgcolor="#FFFFFF"><b>年限</b></td>
                        	    <td width="8%" align="center" bgcolor="#FFFFFF"><b>用户数</b></td>
                        	    <td width="6%" align="center" bgcolor="#FFFFFF"><b>数量</b></td>
                        	    <td width="10%" align="center" bgcolor="#FFFFFF"><b>单价</b></td>
                        	    <td width="10%" align="center" bgcolor="#FFFFFF"><b>总价</b></td>
                        	    <td width="10%" align="center" bgcolor="#FFFFFF"><b>优惠</b></td>
                        	    <td width="10%" align="center" bgcolor="#FFFFFF"><b>实付总额</b></td>
                      	      </tr>
                        	  <tr>
                        	    <td align="center" bgcolor="#FFFFFF">${orderVo.goodsName}<p>（${orderVo.proIds}）</p></td>
                        	    <td align="center" bgcolor="#FFFFFF">${orderVo.useLife}
                        	    	<%-- <c:choose>
			                        	<c:when test="${order.useLife == '-1'}">永久</c:when>
			                        	<c:when test="${order.useLife == '0'}">20天</c:when>
			                        	<c:otherwise>${order.useLife}</c:otherwise>
		                        	</c:choose> --%>
                        	    </td>
                        	    <td align="center" bgcolor="#FFFFFF">${orderVo.userNum}</td>
                        	    <td align="center" bgcolor="#FFFFFF">${orderVo.count}</td>
                        	    <td align="center" bgcolor="#FFFFFF">￥<fmt:formatNumber value="${orderVo.goodsPrice}" pattern="#0.00" /></td>
                        	    <td align="center" bgcolor="#FFFFFF">￥<fmt:formatNumber value="${orderVo.orderMoney}" pattern="#0.00" /></td>
                        	    <td align="center" bgcolor="#FFFFFF">￥
                        	    <c:choose>
                        	    	<c:when test="${userInfo.roleId == 'ROLE_AGENT'}">
                        	    		<fmt:formatNumber value="${orderVo.discount}" pattern="#0.00" />
                        	    	</c:when>
                        	    	<c:otherwise>
                        	    		<c:choose>
                        	    			<c:when test="${userInfo.supplierId != null && supplierInfo.isValid == 0 }">
                        	    				<fmt:formatNumber value="${orderVo.discount}" pattern="#0.00" />
                        	    			</c:when>
                        	    			<c:otherwise>0.00</c:otherwise>
                        	    		</c:choose>
                        	    	</c:otherwise>
                        	    </c:choose>
                        	    </td>
                        	    <td align="center" bgcolor="#FFFFFF">￥
                        	    	<c:choose>
	                        	    	<c:when test="${userInfo.roleId == 'ROLE_AGENT'}">
	                        	    		<fmt:formatNumber value="${orderVo.payMoney}" pattern="#0.00" />
	                        	    	</c:when>
	                        	    	<c:otherwise>
	                        	    		<c:choose>
	                        	    			<c:when test="${userInfo.supplierId != null && supplierInfo.isValid == 0 }">
	                        	    				<fmt:formatNumber value="${orderVo.payMoney}" pattern="#0.00" />
	                        	    			</c:when>
	                        	    			<c:otherwise>
							                        <fmt:formatNumber value="${orderVo.payMoney + orderVo.discount}" pattern="#0.00" />
	                        	    			</c:otherwise>
	                        	    		</c:choose>
	                        	    	</c:otherwise>
                        	    	</c:choose>
                        	    </td>
                      	    </tr>
                      	  </table>
                          <div class="product_price mt20">
                          	<dl class="cle">
                            	<dt>产品总价：</dt>
                                <dd>￥<fmt:formatNumber value="${orderVo.orderMoney}" pattern="#0.00" /><dd>
                            </dl>
                            <dl class="cle">
                            	<dt>优惠：</dt>
                                <dd>-￥
                                	<c:choose>
                        	    	<c:when test="${userInfo.roleId == 'ROLE_AGENT'}">
                        	    		<fmt:formatNumber value="${orderVo.discount}" pattern="#0.00" />
                        	    	</c:when>
                        	    	<c:otherwise>
                        	    		<c:choose>
                        	    			<c:when test="${userInfo.supplierId != null && supplierInfo.isValid == 0 }">
                        	    				<fmt:formatNumber value="${orderVo.discount}" pattern="#0.00" />
                        	    			</c:when>
                        	    			<c:otherwise>0.00</c:otherwise>
                        	    		</c:choose>
                        	    	</c:otherwise>
                        	    </c:choose>
                                <dd>
                            </dl>
                            <dl class="cle">
                            	<dt>代金券：</dt>
                                <dd>-￥<fmt:formatNumber value="${orderVo.voucherMoney}" pattern="#0.00" /><dd>
                            </dl>
                            <dl class="last cle">
                            	<dt>实付总金额：</dt>
                                <dd><font color="#ff6600"><b>￥
		                        	<c:choose>
	                        	    	<c:when test="${userInfo.roleId == 'ROLE_AGENT'}">
					                        <fmt:formatNumber value="${orderVo.payMoney}" pattern="#0.00" />
	                        	    	</c:when>
	                        	    	<c:otherwise>
	                        	    		<c:choose>
	                        	    			<c:when test="${userInfo.supplierId != null && supplierInfo.isValid == 0 }">
							                        <fmt:formatNumber value="${orderVo.payMoney}" pattern="#0.00" />
	                        	    			</c:when>
	                        	    			<c:otherwise>
	                        	    				<fmt:formatNumber value="${orderVo.payMoney + orderVo.discount}" pattern="#0.00" />
	                        	    			</c:otherwise>
	                        	    		</c:choose>
	                        	    	</c:otherwise>
                        	    	</c:choose>
                                </b></font><dd>
                            </dl>
                          </div>
                      	</div>
                  	</div>
                    <!--订单详情结束-->
                </div>
                <!--会员中心右侧-->
                <div class="cl"></div>
			</div>
      	</div>
    </div>
    <!--会员中心中间部分-->
    <!---------------------------------footer------------------------------------>
  	<jsp:include page="../../../common/footer.jsp" />
  	<!---------------------------------footer结束------------------------------------>
</div>
</body>
</html>
